import { connect } from 'react-redux'
import MyHdBill from '../../../../views/My/MyUtils/MyBeans/MyHdBill'

function mapStateToProps(state: any) {
    return {
        userInfo: state.user.userInfo,
        userBeanBill: state.user.userBeanBill,
        userBeanBillCount: state.user.userBeanBillCount, 
    }
}

function mapDispatchToProps(dispatch: (obj: any) => void) {
    return {
        // 'SET_RETURNPOLICY_DATA': (data: any, status: number) => {
        //     dispatch({ type: 'SET_RETURNPOLICY_DATA', data, status })
        // },
        // 'SET_USER_ORDER_INDEX': (data: number) => {
        //     dispatch({ type: 'SET_USER_ORDER_INDEX', data })
        // },
        'SET_USER_BEAN_BILL': (data: any) => {
            dispatch({ type: 'SET_USER_BEAN_BILL', data })
        },
        'SET_USER_BEAN_BILL_COUNT': (data: any) => {
            dispatch({ type: 'SET_USER_BEAN_BILL_COUNT', data })
        },
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(MyHdBill)